Optimal. Leaf size=91 \[ \frac {\left (8 a^2+8 a b+3 b^2\right ) \tan ^{-1}(\sinh (c+d x))}{8 d}-\frac {3 b (2 a+b) \tanh (c+d x) \text {sech}(c+d x)}{8 d}-\frac {b \tanh (c+d x) \text {sech}^3(c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 91, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3676, 413, 385, 203} \[ \frac {\left (8 a^2+8 a b+3 b^2\right ) \tan ^{-1}(\sinh (c+d x))}{8 d}-\frac {3 b (2 a+b) \tanh (c+d x) \text {sech}(c+d x)}{8 d}-\frac {b \tanh (c+d x) \text {sech}^3(c+d x) \left ((a+b) \sinh ^2(c+d x)+a\right )}{4 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 385
Rule 413
Rule 3676
Rubi steps
\begin {align*} \int \text {sech}(c+d x) \left (a+b \tanh ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+(a+b) x^2\right )^2}{\left (1+x^2\right )^3} \, dx,x,\sinh (c+d x)\right )}{d}\\ &=-\frac {b \text {sech}^3(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}+\frac {\operatorname {Subst}\left (\int \frac {a (4 a+b)+(a+b) (4 a+3 b) x^2}{\left (1+x^2\right )^2} \, dx,x,\sinh (c+d x)\right )}{4 d}\\ &=-\frac {3 b (2 a+b) \text {sech}(c+d x) \tanh (c+d x)}{8 d}-\frac {b \text {sech}^3(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}+\frac {\left (8 a^2+8 a b+3 b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sinh (c+d x)\right )}{8 d}\\ &=\frac {\left (8 a^2+8 a b+3 b^2\right ) \tan ^{-1}(\sinh (c+d x))}{8 d}-\frac {3 b (2 a+b) \text {sech}(c+d x) \tanh (c+d x)}{8 d}-\frac {b \text {sech}^3(c+d x) \left (a+(a+b) \sinh ^2(c+d x)\right ) \tanh (c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 7.28, size = 427, normalized size = 4.69 \[ -\frac {\text {csch}^3(c+d x) \left (128 \sinh ^6(c+d x) \left (a^2 \left (5 \sinh ^4(c+d x)+12 \sinh ^2(c+d x)+7\right )+2 a b \left (5 \sinh ^2(c+d x)+6\right ) \sinh ^2(c+d x)+5 b^2 \sinh ^4(c+d x)\right ) \, _4F_3\left (\frac {3}{2},2,2,2;1,1,\frac {9}{2};-\sinh ^2(c+d x)\right )+128 \sinh ^6(c+d x) \left (a \sinh ^2(c+d x)+a+b \sinh ^2(c+d x)\right )^2 \, _5F_4\left (\frac {3}{2},2,2,2,2;1,1,1,\frac {9}{2};-\sinh ^2(c+d x)\right )+35 \left (a^2 \left (485 \sinh ^6(c+d x)+3161 \sinh ^4(c+d x)+5907 \sinh ^2(c+d x)+3375\right )+2 a b \left (485 \sinh ^4(c+d x)+2554 \sinh ^2(c+d x)+2625\right ) \sinh ^2(c+d x)+b^2 \left (485 \sinh ^2(c+d x)+1947\right ) \sinh ^4(c+d x)\right )-\frac {105 \tanh ^{-1}\left (\sqrt {-\sinh ^2(c+d x)}\right ) \left (a^2 \left (9 \sinh ^8(c+d x)+400 \sinh ^6(c+d x)+1674 \sinh ^4(c+d x)+2344 \sinh ^2(c+d x)+1125\right )+2 a b \left (9 \sinh ^6(c+d x)+389 \sinh ^4(c+d x)+1143 \sinh ^2(c+d x)+875\right ) \sinh ^2(c+d x)+b^2 \left (9 \sinh ^4(c+d x)+378 \sinh ^2(c+d x)+649\right ) \sinh ^4(c+d x)\right )}{\sqrt {-\sinh ^2(c+d x)}}\right )}{6720 d} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.42, size = 1373, normalized size = 15.09 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.20, size = 157, normalized size = 1.73 \[ \frac {{\left (8 \, a^{2} e^{c} + 8 \, a b e^{c} + 3 \, b^{2} e^{c}\right )} \arctan \left (e^{\left (d x + c\right )}\right ) e^{\left (-c\right )} - \frac {8 \, a b e^{\left (7 \, d x + 7 \, c\right )} + 5 \, b^{2} e^{\left (7 \, d x + 7 \, c\right )} + 8 \, a b e^{\left (5 \, d x + 5 \, c\right )} - 3 \, b^{2} e^{\left (5 \, d x + 5 \, c\right )} - 8 \, a b e^{\left (3 \, d x + 3 \, c\right )} + 3 \, b^{2} e^{\left (3 \, d x + 3 \, c\right )} - 8 \, a b e^{\left (d x + c\right )} - 5 \, b^{2} e^{\left (d x + c\right )}}{{\left (e^{\left (2 \, d x + 2 \, c\right )} + 1\right )}^{4}}}{4 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.37, size = 173, normalized size = 1.90 \[ \frac {2 a^{2} \arctan \left ({\mathrm e}^{d x +c}\right )}{d}-\frac {2 a b \sinh \left (d x +c \right )}{d \cosh \left (d x +c \right )^{2}}+\frac {a b \,\mathrm {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{d}+\frac {2 a b \arctan \left ({\mathrm e}^{d x +c}\right )}{d}-\frac {b^{2} \left (\sinh ^{3}\left (d x +c \right )\right )}{d \cosh \left (d x +c \right )^{4}}-\frac {b^{2} \sinh \left (d x +c \right )}{d \cosh \left (d x +c \right )^{4}}+\frac {b^{2} \tanh \left (d x +c \right ) \mathrm {sech}\left (d x +c \right )^{3}}{4 d}+\frac {3 b^{2} \mathrm {sech}\left (d x +c \right ) \tanh \left (d x +c \right )}{8 d}+\frac {3 b^{2} \arctan \left ({\mathrm e}^{d x +c}\right )}{4 d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.46, size = 199, normalized size = 2.19 \[ -\frac {1}{4} \, b^{2} {\left (\frac {3 \, \arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {5 \, e^{\left (-d x - c\right )} - 3 \, e^{\left (-3 \, d x - 3 \, c\right )} + 3 \, e^{\left (-5 \, d x - 5 \, c\right )} - 5 \, e^{\left (-7 \, d x - 7 \, c\right )}}{d {\left (4 \, e^{\left (-2 \, d x - 2 \, c\right )} + 6 \, e^{\left (-4 \, d x - 4 \, c\right )} + 4 \, e^{\left (-6 \, d x - 6 \, c\right )} + e^{\left (-8 \, d x - 8 \, c\right )} + 1\right )}}\right )} - 2 \, a b {\left (\frac {\arctan \left (e^{\left (-d x - c\right )}\right )}{d} + \frac {e^{\left (-d x - c\right )} - e^{\left (-3 \, d x - 3 \, c\right )}}{d {\left (2 \, e^{\left (-2 \, d x - 2 \, c\right )} + e^{\left (-4 \, d x - 4 \, c\right )} + 1\right )}}\right )} + \frac {a^{2} \arctan \left (\sinh \left (d x + c\right )\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.16, size = 303, normalized size = 3.33 \[ \frac {\mathrm {atan}\left (\frac {{\mathrm {e}}^{d\,x}\,{\mathrm {e}}^c\,\left (8\,a^2\,\sqrt {d^2}+3\,b^2\,\sqrt {d^2}+8\,a\,b\,\sqrt {d^2}\right )}{d\,\sqrt {64\,a^4+128\,a^3\,b+112\,a^2\,b^2+48\,a\,b^3+9\,b^4}}\right )\,\sqrt {64\,a^4+128\,a^3\,b+112\,a^2\,b^2+48\,a\,b^3+9\,b^4}}{4\,\sqrt {d^2}}-\frac {6\,b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left (3\,{\mathrm {e}}^{2\,c+2\,d\,x}+3\,{\mathrm {e}}^{4\,c+4\,d\,x}+{\mathrm {e}}^{6\,c+6\,d\,x}+1\right )}+\frac {4\,b^2\,{\mathrm {e}}^{c+d\,x}}{d\,\left (4\,{\mathrm {e}}^{2\,c+2\,d\,x}+6\,{\mathrm {e}}^{4\,c+4\,d\,x}+4\,{\mathrm {e}}^{6\,c+6\,d\,x}+{\mathrm {e}}^{8\,c+8\,d\,x}+1\right )}-\frac {{\mathrm {e}}^{c+d\,x}\,\left (5\,b^2+8\,a\,b\right )}{4\,d\,\left ({\mathrm {e}}^{2\,c+2\,d\,x}+1\right )}+\frac {{\mathrm {e}}^{c+d\,x}\,\left (9\,b^2+8\,a\,b\right )}{2\,d\,\left (2\,{\mathrm {e}}^{2\,c+2\,d\,x}+{\mathrm {e}}^{4\,c+4\,d\,x}+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \tanh ^{2}{\left (c + d x \right )}\right )^{2} \operatorname {sech}{\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________